package com.zeropoint.demo.mapper;

import com.zeropoint.demo.pojo.MenuPO;
import com.zeropoint.demo.pojo.RolePO;
import com.zeropoint.demo.pojo.UserPO;
import com.zeropoint.demo.pojo.vo.RegionVO;
import com.zeropoint.demo.pojo.vo.UserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {

    UserPO getUserByName(String name);

    List<RolePO> getRoleById(Integer uid);

    List<MenuPO> selectMenuByUserId(Integer uid);

    List<UserVO> selectUserByRole(Integer uid);

    Integer selectRoleIdByUserName(String username);

    List<String> selectProvinces();

    List<String> selectCityes(String regionName);

    List<String> selectTowns(String regionName);

    int insertUser(UserVO userVO);

    void insertUserRole(UserVO userVO);

    void updateUser(UserPO userVO);

    void updateUserDate(Integer otherId);

    void deleteUser(Integer otherId);

    UserVO seleteUserInformation(Integer userId);
}
